package org.codefinger.dao.impl.sql;

import org.codefinger.dao.impl.SQLVisitor;
import org.codefinger.dao.util.ArrayIterator;

public class Column {

	private ColumnItem[]	columnItems;

	public Column(ColumnItem[] columnItems) {
		super();
		this.columnItems = columnItems;
	}

	public void visitAlias(SQLVisitor visitor) {
		for (ColumnItem item : columnItems) {
			item.visitAlias(visitor);
		}
	}

	public void visitSQL(SQLVisitor visitor) {
		for (ColumnItem item : columnItems) {
			item.visitSQL(visitor);
		}
	}

	public ArrayIterator<ColumnItem> getColumnItems() {
		return new ArrayIterator<ColumnItem>(columnItems);
	}

	public int getColumnSize() {
		return columnItems.length;
	}

}
